"""ScenicAreaMapAdmin URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/3.1/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from django.conf.urls import url, include, static
from django.conf import settings
from django.views.generic import TemplateView
from .views import index
from common.base_admin_site import admin_site
from apps.samap import views as samap_views



urlpatterns = [
    url(r'^$', index),
    path('madmin/', admin_site.urls),
    url(r'^ckeditor/', include('ckeditor_uploader.urls')),
    url(r'^files/', include('filer.urls')),
    # url(r'^select2/', include('select2.urls')),

    path('api/samap/', include('apps.samap.urls')),
    path('madmin/samap/qrcode/', samap_views.qrcode),
    path('madmin/samap/edit_crontask/', samap_views.edit_crontask),
]

# 没有这一句无法显示
urlpatterns += static.static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
